#!/usr/bin/perl
$string=<STDIN>;
$num=<STDIN>;
print $string x $num; 

